package book_management.user.user;

import book_management.user.operation.IOperation;
import book_management.user.operation.impl.*;
import book_management.user.user.User;

public class AdminUser extends User {
    public AdminUser(String userName){
        this.name=userName;
        operations=new IOperation[]{
                new AddOperation(),
                new RemoveOperation(),
                new UpdateOperation(),
                new FindOperation(),
                new DisplayOperation(),
        };
    }
    @Override
    public int menu() {
        System.out.println("=========================");
        System.out.println("欢迎"+this.name+"登录财大图书馆借阅系统");
        System.out.println("1.添加书籍");
        System.out.println("2.删除书籍");
        System.out.println("3.更新书籍");
        System.out.println("4.查找书籍");
        System.out.println("5.显示当前书籍列表");
        System.out.println("-1.退出");
        System.out.println("请输入您的选择");
        int choice= scanner.nextInt();
        //切记不要在这关闭scanner，当用户输入-1退出系统时再关闭
        return choice;
    }
}
